package com.example.myalldemo;

import com.demo.actionbar.ActionBarXMLActivity;
import com.demo.audiofx.MainAudiofxActivity;
import com.demo.expandablistview.MainExpandableListViewActivity;
import com.demo.gallery3d.MainGallery3DActivity;
import com.demo.minesweepergame.MainMinesweeperGameActivity;
import com.demo.musicplayer.MainMusicPlayerActivity;
import com.demo.mytable.MainMyTableActivity;
import com.demo.noteedittext.MainNoteEditTextActivity;
import com.demo.notification.MainNotificationActivity;
import com.demo.sensor.MainSensorActivity;
import com.demo.viewtobitmap.MainViewToBitmapActivity;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	public void btnClick(View v) {
		Intent i;
		switch (v.getId()) {
		case R.id.main_btn_notification:
			i = new Intent();
			i.setClass(this, MainNotificationActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_minesweepergame:
			i = new Intent();
			i.setClass(this, MainMinesweeperGameActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_noteedittext:
			i = new Intent();
			i.setClass(this, MainNoteEditTextActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_expandableListView:
			i = new Intent();
			i.setClass(this, MainExpandableListViewActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_mytableview:
			i = new Intent();
			i.setClass(this, MainMyTableActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_viewtobitmap:
			i = new Intent();
			i.setClass(this, MainViewToBitmapActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_sensor:
			i = new Intent();
			i.setClass(this, MainSensorActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_audiofx:
			i = new Intent();
			i.setClass(this, MainAudiofxActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_actionbar:
			i = new Intent();
			i.setClass(this, ActionBarXMLActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_musicplayer:
			i = new Intent();
			i.setClass(this, MainMusicPlayerActivity.class);
			startActivity(i);
			break;
		case R.id.main_btn_gallery:
			i = new Intent();
			i.setClass(this, MainGallery3DActivity.class);
			startActivity(i);
			break;

		default:
			break;
		}
	}
}
